using UnityEngine;

/// <summary>
/// 坚果墙技能数据
/// </summary>
[CreateAssetMenu(menuName = "创建ScriptableObject/SkillData/Plants/WallNutSkillData")]
public class WallNutSkillData : SkillData
{
    [Header("防御属性")]
    [Tooltip("额外护甲值")]
    public int Armor = 0;
    
    [Tooltip("防御力加成（0.0-1.0）")]
    [Range(0.0f, 1.0f)]
    public float DefenseBonus = 0.0f;
    
    [Tooltip("生命值倍数")]
    public float HealthMultiplier = 1.0f;
    
    [Tooltip("阻挡范围（半径）")]
    public float BlockRange = 1.0f;
    
    [Tooltip("是否可被跳过")]
    public bool CanBeJumped = false;
    
    [Tooltip("是否可被飞行单位越过")]
    public bool CanBeFliedOver = false;
    
    [Tooltip("破损状态的生命值百分比阈值")]
    [Range(0.0f, 1.0f)]
    public float DamageStateThreshold = 0.5f;
    
    private void OnValidate()
    {
        // 确保攻击类型为Taunt
        if (Type != AttackType.Taunt)
        {
            Type = AttackType.Taunt;
        }
    }
}

